package cgl.narada.wsinfra.wsa;

import cgl.narada.wsinfra.schemas.addressing.ActionDocument;
import cgl.narada.wsinfra.schemas.addressing.EndpointReferenceType;
import cgl.narada.wsinfra.schemas.addressing.FaultToDocument;
import cgl.narada.wsinfra.schemas.addressing.FromDocument;
import cgl.narada.wsinfra.schemas.addressing.RelatesToDocument;
import cgl.narada.wsinfra.schemas.addressing.ReplyAfterDocument;
import cgl.narada.wsinfra.schemas.addressing.ReplyToDocument;
import cgl.narada.wsinfra.schemas.addressing.ToDocument;
import cgl.narada.wsinfra.schemas.soap.EnvelopeDocument;

/** This is a utility which creates SOAP enevelopes initialized to the
    specified WSA headers.

    @author Shrideep Pallickara
    $Date: 2005/03/18 20:20:27 $
    $Revision: 1.4 $
*/


public interface WsaEnvelopeCreator {
	
  /** Prepare SOAP envelope based on the specified WS-Addressing headers.
    Creates the MessageID element automatically. */
  public EnvelopeDocument
  createSoapEnvelope(EndpointReferenceType to, FromDocument from,
			         ActionDocument action);


  /** Prepare SOAP envelope based on the specified WS-Addressing headers.
      Creates the MessageID element automatically. */
  public EnvelopeDocument
  createSoapEnvelope(EndpointReferenceType to, FromDocument from,
		     ActionDocument action, RelatesToDocument relatesTo);


  /** Prepare SOAP envelope based on the specified WS-Addressing headers.
      Creates the MessageID element automatically. */
  public EnvelopeDocument
  createSoapEnvelope(EndpointReferenceType to, FromDocument from,
		     ActionDocument action,
		     ReplyToDocument replyTo, ReplyAfterDocument replyAfter,
		     FaultToDocument faultTo);


  /** Prepare SOAP envelope based on the specified WS-Addressing headers.
      Creates the MessageID element automatically. */
  public EnvelopeDocument
  createSoapEnvelope(ToDocument to, FromDocument from,
		     ActionDocument action,
		     ReplyToDocument replyTo, ReplyAfterDocument replyAfter,
		     FaultToDocument faultTo);

  
  /** Prepare SOAP Envelope based on the specified WS-Addressing header. This
      method is specifically used by WS-Eventing sources where there 
      application does not know where a message would be sent. This method
      creates the MessageID element automatically. */
  public EnvelopeDocument createSoapEnvelope(FromDocument from);
}